$(document).ready(function() {
    // check if files working
    console.log(settings + " " + helper + " " + "main");

    /*
     * @param event clicked event to login
     */
    $("#loginForm input[type=submit]").click(function(event) {
        login();
    });
    
    $("#addMenuForm input[type=submit]").live("click", function(event) {
        appendMenu();
    })
    
    $("#addPageForm input[type=submit]").live("click", function(event) {
        appendPage();
    })

    /*
     * @param event clicked event to logout
     */
    $("#logout").click(function(event) {
        logout();
    });

    $("#addMenu").click(function(event) {
        addMenu(); // load addMenu.php
    })

    /*
     * @param event data page loaded in get function
     */
    $("#addPage").click(function(event) {
        addPage(); // load addPage.php
    });

    /*
     * @param event data page loaded in get function
     */
    $("#managePage").click(function(event) {
        managePage(); // load managePage.php
    });

    /*
     * @param event data page loaded in get function
     */
    $("#gallery").click(function(event) {
        gallery(); // load gallery.php
    });

    /*
     * @param event data page loaded in get function
     */
    $("#addNews").click(function(event) {
        addNews(); // load addNews.php
    });

    /*
     * @param event data page loaded in get function
     */
    $("#statistics").click(function(event) {
        statistics(); // load addNews.php
    });

    /*
     * @param event data page loaded in get function
     */
    $("#serverStatus").click(function(event) {
        serverStatus(); // load addNews.php
    });
});
